package com.weasing.res.dao.impl;

import java.util.List;

import org.springframework.stereotype.Repository;

import com.weasing.res.dao.IWxDictDao;
import com.weasing.res.dao.base.impl.BaseDaoImpl;
import com.weasing.res.domain.WxDict;

@Repository
public class WxDictDaoImpl extends BaseDaoImpl<WxDict> implements IWxDictDao {

	@Override
	public String findWxDictByDictName(String dictname) {
		String dictinfo = null;
		String hql = "from WxDict wd where wd.dictname = ?";
		List<WxDict> list = (List<WxDict>) this.getHibernateTemplate().find(
				hql, dictname);
		if (list.size() > 0) {
			dictinfo = list.get(0).getDictinfo();
		}
		return dictinfo;
	}
}
